# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_USER
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_user
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_user.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_user
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_user
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_user
    COMMAND test_data_element_user
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_ITEM
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_item
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_item.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_item
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_item
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_item
    COMMAND test_data_element_item
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_TEAM
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_team
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_team.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_team
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_team
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_team
    COMMAND test_data_element_team
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_USER_TEAM_ROLE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_user_team_role
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_user_team_role.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_user_team_role
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_user_team_role
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_user_team_role
    COMMAND test_data_element_user_team_role
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_WORKFLOW
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_workflow
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_workflow.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_workflow
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_workflow
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_workflow
    COMMAND test_data_element_workflow
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_STATE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_state
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_state.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_state
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_state
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_state
    COMMAND test_data_element_state
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_EDGE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_edge
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_edge.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_edge
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_edge
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_edge
    COMMAND test_data_element_edge
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_ITEM_TYPE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_item_type
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_item_type.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_item_type
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_item_type
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_item_type
    COMMAND test_data_element_item_type
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_FIELD_TYPE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_field_type
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_field_type.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_field_type
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_field_type
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_field_type
    COMMAND test_data_element_field_type
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_ROLE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_role
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_role.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_role
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_role
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_role
    COMMAND test_data_element_role
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_ROLE_MENU_ITEM
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_role_menu_item
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_role_menu_item.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_role_menu_item
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_role_menu_item
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_role_menu_item
    COMMAND test_data_element_role_menu_item
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_RULE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_rule
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_rule.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_rule
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_rule
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_rule
    COMMAND test_data_element_rule
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_RULE_STATE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_rule_state
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_rule_state.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_rule_state
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_rule_state
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_rule_state
    COMMAND test_data_element_rule_state
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_RULE_ITEM_TYPE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_rule_item_type
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_rule_item_type.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_rule_item_type
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_rule_item_type
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_rule_item_type
    COMMAND test_data_element_rule_item_type
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_RULE_PROJECT
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_rule_project
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_rule_project.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_rule_project
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_rule_project
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_rule_project
    COMMAND test_data_element_rule_project
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_PROJECT
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_project
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_project.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_project
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_project
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_project
    COMMAND test_data_element_project
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_PHASE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_phase
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_phase.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_phase
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_phase
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_phase
    COMMAND test_data_element_phase
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_ITEM_HISTORY
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_item_history
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_item_history.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_item_history
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_item_history
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_item_history
    COMMAND test_data_element_item_history
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_ITEM_USER_STATE
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_item_user_state
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_item_user_state.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_item_user_state
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_item_user_state
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_item_user_state
    COMMAND test_data_element_item_user_state
)

# ---------------------------------------------------------------------------- #
# TEST_DATA_ELEMENT_ITEM_FIELD
# ---------------------------------------------------------------------------- #
add_executable(
    test_data_element_item_field
    ${CMAKE_CURRENT_SOURCE_DIR}/test_data_element_item_field.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_data_element_item_field
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_data_element_item_field
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_data_element_item_field
    COMMAND test_data_element_item_field
)
